<?php

require_once "core-application/class.game.php";
require_once "core-application/core/class.tamplate.php";

$Game = new game;
$data = array();

$Game -> controllUserSession();

$pageGet = ( ! empty($_GET['page'])) ? trim(mysql_real_escape_string($_GET['page'])) : '';
$data['pageOutput'] = '';

if($pageGet != '')
{
	include "$pageGet.php";
	$View = new Views('templates/pages/' . $pageGet . '.temp.html', $data);
	$data['pageOutput'] = $View -> getView();
}

if( ! empty($View) AND $View instanceof Views)
{
	$View -> setView('templates/game.temp.html', $data);
} else {
	$View = new Views('templates/game.temp.html', $data);
}
$View -> showView();


?>